package daybook.io.args;

import com.beust.jcommander.Parameter;
import com.beust.jcommander.Parameters;

import java.util.ArrayList;
import java.util.List;

import static daybook.Resources.RESOURCES_NAME;
import static daybook.Resources.Usages.COMMAND_INIT;
import static daybook.Resources.Usages.INIT_DIRECTORY;

@Parameters(separators = "=", resourceBundle = RESOURCES_NAME,
        commandDescriptionKey = COMMAND_INIT)
public class CommandInit {
    @Parameter(descriptionKey = INIT_DIRECTORY)
    private List<String> directory;

    public CommandInit() {
        directory = new ArrayList<>(1);
        directory.add(".");
    }

    public String getDirectory() {
        return directory.get(0);
    }
}
